-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow constructing a microsoft.sql.DateTimeOffset
instance from a java.time.OffsetDateTime
value
#2339
Allow constructing a microsoft.sql.DateTimeOffset
instance from a java.time.OffsetDateTime
value
#2339
Conversation
…a.time.OffsetDateTime value
@arashi01 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
@microsoft-github-policy-service agree |
/azp run CI-mssql-jdbc |
Azure Pipelines successfully started running 1 pipeline(s). |
…alueOf(OffsetDateTime)
@lilgreenbird Caught a bug caused by missing upwards rounding of second values if nanos are within 50ns of the next second. Corrected it and added a unit test. Behaviour now fits with existing semantics. |
@arashi01 really sorry for this but could you please open a new PR for this? your PR came in while we were doing some updates to the pipelines and for some reason it's stuck in an old version. |
@lilgreenbird No worries! Done. |
Operates similarly to existing constructor however avoids additional expense of creating Timestamp instances, and increased timezone related error potential, by directly converting java.time.OffsetDateTime instances.
Reverse of existing
DateTimeOffset.getOffsetDateTime()
method.Rounds precision to closest 100ns matching existing semantics of
Timestamp
based constructor.